//var openScoll=document.getElementById('input_menu');
//openScoll.onclick=function(){
//	document.body.style.position = 'fixed';
//	document.body.style.overflow = 'hidden';
//}
//var closeScoll=document.getElementsById('js_cha');
//closeScoll.onclick=function(){
//	document.body.style.position = 'relative';
//	document.body.style.overflow = 'auto';
//}

//---滚动监听
//window.onload=a();
window.onscroll=function(){
	var scrollheight=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop;
	var logoheight=document.querySelector('.header_logo');
	
	if(scrollheight>0){
//		logoheight.css("width","v(100)");不行	
logoheight.style.height="30px";
logoheight.style.transition="all 1s";

//		logoheight.style.transform="scale(1)";
	}
	else{
		logoheight.style.height="50px";
//	else if(scrollheight>0){
//		logoheight.css("width","v(222)");不行
//		logoheight.style.transform="scale(.5)";
	}
//	setTimeout("a()",100);
}


//---锁定滚动
function openScoll() {
	document.body.style.position = 'fixed';
	document.body.style.overflow = 'hidden';
}
function closeScoll() {
	document.body.style.position = 'relative';
	document.body.style.overflow = 'auto';
}


//user.html
var smallWeb = document.getElementById('smWeb');
function displayUser() {
	smallWeb.style.display = "block";
}
function hiddenUser() {
	smallWeb.style.display = "none";
}

//缓慢回到顶部
document.querySelector(".topsign").addEventListener("click",function(){
	var timer = setInterval(function(){
		var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
		var speed = Math.floor(-scrollTop/10);
		if(scrollTop<=0){
			clearInterval(timer);
		}
		document.documentElement.scrollTop=document.body.scrollTop=scrollTop+speed;
	},1000/60)
})

//监听搜索框输入
var inp = document.querySelector(".search_input").querySelector("input");
inp.addEventListener("input",function(){
	inp.style.fontSize = "20px";
})
